import { RouteRecordRaw } from "vue-router"
import SiteLayout from '@/layout/index.vue'

/**
 * 权限管理相关路由
 */
const settingRoutes: RouteRecordRaw[] = [
  {
    path: '/setting',
    component: SiteLayout,
    children: [
      {
        path: 'permissions',
        component: () => import('@/views/setting/permissions/index.vue'),
        children: [
          {
            path: 'admin',
            component: () => import('@/views/setting/permissions/admin/index.vue'),
            meta: {
              title: '管理员',
            },
          },
          {
            path: 'role',
            component: () => import('@/views/setting/permissions/role/index.vue'),
            meta: {
              title: '角色',
            },
          },
          {
            path: 'menu',
            component: () => import('@/views/setting/permissions/menu/index.vue'),
            meta: {
              title: '菜单权限',
            },
          },
        ],
        meta: {
          title: '权限管理',
        },
      },
    ],
    meta: {
      title: '设置',
    },
  }
]

export default settingRoutes
